package com.michaelbulava.TFS.tpignore;

import com.microsoft.tfs.util.Check;

import java.util.Comparator;
import java.util.regex.Pattern;

/**
 * Created by mbulava on 6/23/2015.
 */
public class TPIgnorePatternComparator implements Comparator<Pattern> {
    @Override
    public int compare(Pattern pattern1, Pattern pattern2) {
        Check.notNull(pattern1, "pattern1");
        Check.notNull(pattern2, "pattern2");

        return pattern1.pattern().compareTo(pattern2.pattern());
    }
}
